import { createRouter, createWebHashHistory } from 'vue-router'
import System from '~/utils/System'
import baseRouterList from './baseRouterList'

const routes = [
    ...baseRouterList,
    {
        path: '/:matchOthers(.*)*',
        component: () => import('~/views/404/index.vue')
    }
]

const router = createRouter({
    history: createWebHashHistory(),
    routes
})
router.beforeEach(async (to, from, next) => {
    next()
})
System.router = router

export default router
